package com.some;

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class YinHang02 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        StringBuilder sb = new StringBuilder();
        Map<Character, Integer> map = new HashMap<>();
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            if (!map.containsKey(c)){
                map.put(c, 1);
            }else map.replace(c, map.get(c) + 1);
        }
        for (Character c : map.keySet()) {
            if (map.get(c) >= 2){
                sb.append(c);
            }
        }
        System.out.println(sb);
    }
}
